<?php

//展示销售记录模块，Input = NULL，Output = 本店的销售记录
header("content-type:application/json;charset=utf-8");

include_once "0.1conn.php"; //连接数据库

session_start();
$shop_id = $_SESSION['user']['shop_id'];
$query = "SELECT * FROM sale_record WHERE shop_id = '$shop_id'";

$arr722 = array();
if ($result = mysqli_query($conn, $query)) {
    //显示查询结果
    while ($row = mysqli_fetch_assoc($result)) {
        $arr722[] = $row;
    }
    //释放结果集合
    mysqli_free_result($result);
}
echo json_encode($arr722);
//关闭连接
mysqli_close($conn);

